const express = require("express");
const { getAll, save,get,remove,update } = require("../controllers/recipes");
const {authenticate} = require("../middleware/auth");
const router = express.Router();

// save需要先通过认证
router.route("/").get(getAll).post(authenticate(),save);
router.route("/:id").get(get).put(update).delete(remove);
module.exports = router;
